package com.bodgittandscarper.broker.types.impl;

import com.bodgittandscarper.broker.types.DatabaseField;
/**
 * 
 * Implementation class of the {@link DatabaseField} 
 * 
 * @author Morten Rummelhoff
 *
 */
public class DatabaseFieldImpl implements DatabaseField{

	
	
	/**
	 * Version number for serializable object.  
	 */
	private static final long serialVersionUID = 2559500023406709626L;
	
	/**
	 * @serial
	 */
	private String fieldName;
	/**
	 * @serial
	 */
	private int fieldSize;
	
	/**
	 * Constructor specifying a field name and field size.
	 * 
	 * @param fieldName The name of the field
	 * @param fieldSize The size of the field
	 */
	public DatabaseFieldImpl(String fieldName, int fieldSize) {
		this.fieldName = fieldName;
		this.fieldSize = fieldSize;
	}

	public String getFieldName() {
		return fieldName;
	}

	public int getFieldSize() {
		return fieldSize;
	}
	
	@Override
	public String toString() {
		return "FieldName: " + getFieldName() + 
			" -  FieldSize: " + getFieldSize();
	}
	
	
}
